
package com.seekting.study;

public class SyncTest {

    private synchronized void test1() {

        System.out.println("test1");
        test2();
    }

    private void test3() {
        System.out.println("test3");
        test4();
    }

    private synchronized void test4() {

        System.out.println("test4");
    }

    private synchronized void test2() {

        System.out.println("test2");
        test3();
    }

    public static void main(String[] args) {
        new SyncTest().test1();
    }
}
